import { commonApi } from './api'
import axios from 'axios'

export default {
  retrieveFile(fileName) {
    return axios({
      method: 'get',
      url: commonApi.retrieveFileUrl(fileName),
      withCredentials: true
    })
  },
  uploadFiles(files) {
    return axios({
      method: 'post',
      url: commonApi.uploadFilesUrl(),
      data: files,
      withCredentials: true
    })
  },
  uploadFilesCompress(files,width,height) {
    return axios({
      method: 'post',
      url: commonApi.uploadFilesUrlCompress(width,height),
      data: files
    })
  }
}
